package com.libre.generator;

import com.libre.generator.util.AutoGeneratorUtil;
import freemarker.template.TemplateException;

import java.io.IOException;
import java.sql.SQLException;

/**
 * @description 代码生成器
 * @author 庞留杰
 * @date 2020/7/28 13:05
 * @version V1.0
 **/
public class MysqlGenerator {

    public static void main(String[] args) throws ClassNotFoundException, SQLException, IOException, TemplateException {
        String driver = "com.mysql.jdbc.Driver";//驱动
        String url = "jdbc:mysql://127.0.0.1:3306/flowable?useUnicode=true&characterEncoding=utf-8&useSSL=false";//数据库地址
        String name = "root";//用户名
        String passWord = "123456";//密码
        String tableName = "sys_role_permission";//表名
        String moduleName = "生成代码";//属于哪一个module
        String businessName = "auth";//委托模块
        String author = "庞留杰";//作者
        String description = "用户角色";  //描述信息
        String version = "V1.0";//版本
        //实例化
        AutoGeneratorUtil autoGeneratorUtil = new AutoGeneratorUtil(url, name, passWord, driver, tableName, moduleName, businessName, author, description, version);
        //调用生成java代码方法
        autoGeneratorUtil.autoGenerationJavaCode();
    }
    
}
